package com.alex.demo.mybatisplus.enums;

import com.baomidou.mybatisplus.annotation.IEnum;

/**
 * 国籍枚举类
 */
public enum NationalEnum implements IEnum<Integer> {

	CHINA(1, "中国"), //
	AMERICA(2, "美国"), //
	JAPAN(3, "日本");

	private int code;

	private String desc;

	NationalEnum(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	// 标记数据库存储的值是code
	@Override
	public Integer getValue() {
		return this.code;
	}
}
